<% if !@user.nil? then %>
  <%= @user.profile.name %><%= link_to "logout", home_logout_path, :id => 'power' %>
<% else %>
  <%= form_tag(url_for(:controller => 'sessions', :action => 'home_login'), :method=>'post', :style => "margin:0") do %>
    <input class="input_login" id="username" name="username" type="text" value="username" />
    <input class="input_login" id="password" name="password" type="password" />
    <input class="input_login_submit" type="submit" value="Sign in" />
  <% end %>
<% end %>